package IO流;

import java.io.UnsupportedEncodingException;

/**
 * 字符字节
 *解码操作
 * */
public class File04Decode {


    public static void main(String[] args) throws UnsupportedEncodingException {
        String msg = "哈哈哈哈s";
        //编码默认当前（UTF—8）汉字三个。字母一个，结果13
        byte[] data = msg.getBytes("gbk");
         System.out.println(data.length);

        //解码：字符串
        msg =new String(data,0,data.length-3,"Gbk");
        System.out.println(msg);



    }
}
